import request from '@/utils/request'

// 查询节奏型列表
export function listPattern(query) {
  return request({
    url: '/system/pattern/list',
    method: 'get',
    params: query
  })
}

// 查询节奏型详细
export function getPattern(patternId) {
  return request({
    url: '/system/pattern/' + patternId,
    method: 'get'
  })
}

// 新增节奏型
export function addPattern(data) {
  return request({
    url: '/system/pattern',
    method: 'post',
    data: data
  })
}

// 修改节奏型
export function updatePattern(data) {
  return request({
    url: '/system/pattern',
    method: 'put',
    data: data
  })
}

// 删除节奏型
export function delPattern(patternId) {
  return request({
    url: '/system/pattern/' + patternId,
    method: 'delete'
  })
}
// 获取节奏文件
export function getBPatternFile(patternId) {
  return request({
    url: 'system/pattern/getBPatternFile/' + patternId,
    method: 'get'
  })
}

// 节奏上传 
export function uploadBPatternFile(data) {
  return request({
    url: 'system/pattern/uploadBPatternFile',
    method: 'post',
    data: data
  })
}